package PTA_JAVA.Exception6.demo2;

import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.next());
        int[] arr = new int[n];
        for (int i = 0; i < n; i++) {
            try{
                arr[i]= Integer.parseInt(sc.next());
            }catch(Exception e){
                i--;
                System.out.println(e);
            }
        }
        System.out.println(Arrays.toString(arr));
    }
}
